package com.cgtong.android.mvp.contract;

import com.cgtong.android.bean.ProblemBean;
import com.cgtong.android.bean.SimpleResult;
import com.cgtong.android.http.callback.BaseCallBack;
import com.cgtong.android.http.callback.FollowCallBack;
import com.cgtong.android.http.callback.ProblemDetailCallBack;
import com.zhouyou.http.callback.SimpleCallBack;
import com.zhouyou.http.exception.ApiException;
import com.zhouyou.http.model.ApiResult;

/**
 * Created by chunc on 2017/10/24.
 */

public interface ProblemDetailContract {
    interface Model {
        void httpProblemDetailData(long problemId, ProblemDetailCallBack<ProblemBean> simpleCallBack);

        void follow(long id, FollowCallBack<ApiResult> followCallBack);

        void evaluate(long problemId, int level, SimpleCallBack<SimpleResult> simpleCallBack);

        void deleteReport(long id, BaseCallBack<ApiResult> baseCallBack);

    }

    interface View {
        void onHttpProblemDetailDataSuccess(ProblemBean problemBean);

        void onError(ApiException e);

        void onError(ProblemBean problemBean);


        void onFollowSuccess(long id, ApiResult result);

        void showLoading(boolean showLoading);

        void onEvaluateSuccess(SimpleResult result);

        void onDeleteReportSuccess(ApiResult result);
    }

    interface Presenter {
        void httpProblemDetailData(long problemId);

        void onDestroy();

        void follow(long id);

        void evaluate(long problemId, int level);

        void deleteReport(long id);


    }
}
